<!DOCTYPE html>
<html>

<head>
<meta charset="utf-8">
<title>openyelp</title>
<link rel="stylesheet" href="${siteurl}assets/css/www-pkg.css" />
[#include "/theme/yelp/common/scripts.html"]
<link rel="stylesheet"
	href="${siteurl}assets/plugs/kindeditor/themes/default/default.css" />
<script charset="utf-8"
	src="${siteurl}assets/plugs/kindeditor/kindeditor-min.js"></script>
<script charset="utf-8"
	src="${siteurl}assets/plugs/kindeditor/lang/zh_CN.js"></script>
</head>

<body class="country-hk logged-out ytype jquery" id="yelp_main_body"
	ryt13230="1">

	<div id="fb-root"></div>

	<div class="lang-en" id="wrap">



		[#include "/theme/yelp/common/header.html"]

		<div id="print-masthead">
			<img alt="Yelp" class="print-bkg-img"
				src="http://s3-media2.fl.yelpcdn.com/assets/2/www/img/b7e9d647188d/gfx/header_print.gif">
		</div>

		<span class="offscreen" id="page-content">&nbsp;</span>

		<div class="main-content-wrap main-content-wrap--box">

			<div class="content-container" id="super-container">


				<div id="alert-container">

					<span class="offscreen">成功的訊息：</span>

					<div class="alert alert-success">
						<p class="alert-message">多謝你提交此活動！</p>
					</div>

				</div>


				<div class="container add-event-photos">
					<div class="clearfix page-header">
						<h2 class="heading">
							新增相片到<a
								href="${siteurl}events/view?id=${event.id}">${event.name!''}</a>
						</h2>
						<a class="floatLink"
							href="${siteurl}events/view?id=${event.id}">跳過此步驟</a>

					</div>
					<div class="clearfix layout-block layout-full">
						<div class="column column-alpha ">
							<div id="photo-upload-toggler">
								<div class="selected_label" id="local_photo_ctrl">
									<input type="radio" name="field_select" checked=""
										id="select_local_photo"> <label
										for="select_local_photo">相片在我的電腦上</label>
								</div>
								<div class="selected_label" id="remote_photo_ctrl">
									<input type="radio"  value="private"  name="field_select"
										id="select_remote_photo"> <label
										for="select_remote_photo">相片在網頁上</label>
								</div>
								<br>
							</div>

							<div id="file-uploader">

								<div id="html-uploader">





									<form name="upload_new_photo" method="POST"
										id="upload_new_photo" enctype="multipart/form-data"
										class="yform ytype"
										action="${siteurl}events/addphoto.htm">
										<input type="hidden"
										value="${event.id}"
										class="csrftok" name="eventinfo.id"> <label>選擇檔案上載</label>
												<div>
										<input name="url" required="required" readonly="readonly"
											type="text" id="url1" value=""
											style="display: inline-block; width: 300px" /> <input
											type="button" id="image1" value="选择图片" />
									</div>
										
										
										
										 <label
											for="caption">新增一個說明字幕</label>

										<textarea name="messages"></textarea>


										<button class="ybtn ybtn-primary ybtn-small ytype"
											value="Add Photo" type="submit" name="action_submit">
											<span>新增相片</span>
										</button>
										<input type="hidden" value="true" name="create_flow">
										<input type="submit" class="strong_pseudolink" value="跳過此步驟"
											name="action_skip">
									</form>
								</div>
							</div>

							<div class="hidden" id="url-uploader">





								<form name="upload_new_photo_http" method="POST"
									id="upload_new_photo_http" enctype="multipart/form-data"
									class="yform ytype"
									action="${siteurl}events/addphoto.htm">
									<input type="hidden"
										value="${event.id}"
										class="csrftok" name="eventinfo.id"> <label for="url">為圖片加入
										URL</label> <input required="required" type="text" value="" name="url"> <label
										for="caption">新增一個說明字幕</label>

									<textarea name="caption"></textarea>


									<button class="ybtn ybtn-primary ytype" value="Add Photo"
										type="submit" name="action_submit">
										<span>新增相片</span>
									</button>
									<input type="hidden" value="true" name="create_flow"> <input
										type="submit" class="strong_pseudolink" value="跳過此步驟"
										name="action_skip">
								</form>
							</div>


						</div>
					</div>
				</div>
			</div>
		</div>

		<!-- google_ad_section_start(weight=ignore) -->
		<!-- <a href="/biz/outlook-autumn-market-fundamental-catwalk-flimsy-roost-legibility-individualism-grocer-predestination-2">yelp</a> -->
		[#include "/theme/yelp/common/footer.html"]

       
	</div>
<script type="text/javascript">
$(document).ready(function(){
	
	$("input[name='field_select']").change(function(data){
		
		if($(this).val()=="private"){
			
			
			$("#file-uploader").hide();
			$("#url-uploader").show();
		}else{
			$("#file-uploader").show();
			$("#url-uploader").hide();
		}
	}); 
	//
});

KindEditor.ready(function(K) {
	var editor = KindEditor.editor({
		allowFileManager : true,
		uploadJson : '${siteurl}/image/upimgwork.htm'
	});
	K('#image1').click(
			function() {
				editor.loadPlugin('image', function() {
					editor.plugin.imageDialog({
						imageUrl : K('#url1').val(),
						clickFn : function(url, title, width, height,
								border, align) {
							K('#url1').val(url);
							editor.hideDialog();
						}
					});
				});
			});
});
</script>


</body>

</html>